package com.bdqn.crm.pojo;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.management.relation.Role;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "sys_right")
@JsonIgnoreProperties(value = {"hibernateLazyInitializer","handler"})
public class SysRight implements Serializable {

  @TableId(value = "right_code")
  private String rightCode;
  private String rightParentCode;
  private String rightType;
  private String rightText;
  private String rightUrl;
  private String rightTip;

  //多对多
  @TableField(exist = false)
  private Set<SysRole> roles = new HashSet<SysRole>(0);

}
